﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="Generator" content="EditPlus" />
	<meta name="Author" content="FanFu" />
	<meta name="Keywords" content="" />
	<meta name="Description" content="" />

	<title>后台登录</title>
	<link href="css/login.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.6.1.min.js" type="text/javascript"></script>
	<!--[if IE 6]>
		<script type="text/javascript" src="js/DD_belatedPNG_0.0.8a-min.js"></script>
		<script type="text/javascript">
			DD_belatedPNG.fix('#login, .error');
		</script>
	<![endif]-->
    <script type="text/javascript">
        window.history.forward(1);

        function ChangeImg() {
            var img = document.getElementById("vcImg");
            img.src = "ValidateCode.aspx?" + Math.random();
        }
        function Appear(msg) {
            $("#errorText").html(msg).fadeTo(500, 1, function () {
                $(this).slideDown(500);
            });
            setTimeout("Disappear()", 2000);
        }
        function Disappear(){
            $("#errorText").fadeTo(400, 0, function () {
                $(this).slideUp(400);
            });
        }
        function ValidatorInput() {
            if ($.trim($("#txtUserName").val()) == "") {
                Appear('请输入用户名！');
                $("#txtUserName").focus();
                return false;
            }
            if ($.trim($("#txtUserPwd").val()) == "") {
                Appear('请输入密码！');
                $("#txtUserPwd").focus();
                return false;
            }
            if ($.trim($("#txtValidate").val()) == "") {
                Appear('请输入验证码！');
                $("#txtValidate").focus();
                return false;
            }
            return true;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div id="login" class="png_bg">
			<div id="login_title">
				<h1>FanFublog-Admin</h1>
			</div>
			<div id="login_content">
				<div id="errorText" class="error">用户名或密码错误！</div>
				<table>
					<tr>
						<td width="68" ><label class="lbtext" for="txtUserName">用户名：</label></td>
						<td width="212"><input id="txtUserName" class="textbox" type="text" runat="server" /></td>
					</tr>
					<tr>
						<td><label class="lbtext" for="txtUserPwd">密&nbsp;&nbsp;&nbsp;码：</label></td>
						<td><input id="txtUserPwd" class="textbox" type="password" runat="server" /></td>
					</tr>
					<tr>
						<td><label class="lbtext" for="txtValidate">验证码：</label></td>
						<td>
							<input class="textbox validateText" id="txtValidate" type="text" runat="server" />
							<img alt="验证码" title="点我试试" id="vcImg" class="validateGif" onclick="ChangeImg();" src="ValidateCode.aspx" />
						</td>
					</tr>
					<tr>
						<td colspan="2" class="remember">
							<input id="chkRememberPwd" type="checkbox" runat="server"/>
							<label for="chkRememberPwd">记住密码</label>
						</td>
					</tr>
					<tr>
						<td colspan="2">
                            <asp:Button class="btn_submit" ID="btnSubmit" runat="server" Text="登录" OnClientClick="return ValidatorInput();" onclick="btnSubmit_Click" />
                        </td>
					</tr>
				</table>
			</div>
		</div>
    </form>
</body>
</html>
